<fieldset id="users">
	<div id="user-list">
		<table border="0" width="100%">
			<thead>
				<tr><th>Username</th><th>Password</th><th>Assigned Group</th><th></th></tr>
			</thead>
			<tbody style="height:150px;position: relative;max-height: 150px;overflow: auto;">
				<c:foreach var="users" name="user">
					<tr>
						<td style="padding-left: 5px;"><c:input name="users[name][]" value="#user.name"/></td>
						<td style="padding-left: 5px;"><c:input name="users[pass][]" type="password" value="********"/></td>
						<td style="padding-left: 5px;"><c:input type="select" name="users[group][]" values="groups" value="#user.group"/></td>
						<td><a href="javascript:" onclick="this.up('tr').remove();"><img src='templates/builder/images/delete.gif' alt='' border="0"/></a></td>
					</tr>
				</c:foreach>
			</tbody>
			<tfoot>
				<tr>
					<td colspan="2" style="padding-left: 5px;">
						<button type="button" onclick="var sel = _('#user-list tbody tr:first').html();_('#user-list tbody').append('<tr>'+sel+'</tr>');var e=_('#user-list tbody tr')[_('#user-list tbody tr').length-1];e.down('input').setAttribute('value', '');e.down('select').value='cms';">Add user</button>
						<button type="button" onclick="var n=prompt('Enter the group\'s name:');if(n.length>0){_('#user-list select').append('<option value=\''+n+'\'>'+n+'</option>');}">Add group</button>
					</td>
				</tr>
			</tfoot>
		</table>
	</div>
</fieldset>